package com.xyoto.community.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.xyoto.community.po.ContentDetailsPO;
import com.xyoto.community.po.UserTitlePO;
import com.xyoto.community.utils.PictureUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author coderFu
 * @create 2021/10/7
 */
@ApiModel("互动消息列表VO")
@Data
public class InteractMessageListVO {

    @ApiModelProperty("自增id(消息）")
    private Integer id;

    @ApiModelProperty("用户id")
    private Integer userId;

    @ApiModelProperty("用户头像")
    private String  avatarUrl;

    @ApiModelProperty("用户昵称")
    private String  nickname;

    @ApiModelProperty("头衔")
    @JsonProperty("userTitle")
    private UserTitlePO userTitlePO;

    @ApiModelProperty("消息类型")
    private Short type;

    @ApiModelProperty("动态评论id")
    private Integer dynamicCommentId;

    @ApiModelProperty("动态评论内容")
    private String dynamicCommentContent;

    @ApiModelProperty("动态回复id")
    private Integer dynamicReplyId;

    @ApiModelProperty("动态回复内容")
    private String dynamicReplyContent;

    @ApiModelProperty("动态回复的回复")
    private String dynamicDoubleReplyContent;

    @ApiModelProperty("动态详情|问答详情")
    private ContentDetailsPO contentDetailsPo;

    @ApiModelProperty("创建时间")
    private Date createTime;

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = PictureUtils.addPrefix(avatarUrl);
    }
}
